const ipc = require('electron').ipcRenderer;

var messageHandler = function() {

    return {
        on: function(channel, listener) {
            ipc.on(channel, listener)
        },
        remove: function(channel) {
            ipc.removeAllListeners(channel)
        }
    }
}

exports.MessageHandler = messageHandler